package org.example.config;

import okhttp3.OkHttpClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.TimeUnit;

/**
 * @description: OkHttp配置
 * @author:诗歌采薇
 * @date: 2023/7/4
 * @Copyright:一切会更好！
 */
@Configuration
public class OkHttpConfig {
    
    
    @Bean
    public OkHttpClient okHttpClient(){
        return new OkHttpClient.Builder()
                .connectTimeout(3L, TimeUnit.SECONDS)
                .readTimeout(3L,TimeUnit.SECONDS)
                .build();
    }
    
}
